package org.example.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class WebMvConfig implements WebMvcConfigurer {
    @Override
    public void addCorsMappings(CorsRegistry registry) {
        registry.addMapping("/**")
                .allowedOrigins("http://111.230.111.143:8080","http://111.230.111.143","http://localhost:8080","http://localhost:8001")
                .allowCredentials(true)
                .allowedMethods("*")
                .maxAge(36000);
    }
}
